package com.congee02.modelshellmvn.anno;

import java.util.ArrayList;

public interface RecordAdapter<S, D> {

    D adapt(S s);

    default Iterable<D> adaptMulti(Iterable<S> s) {
        ArrayList<D> res = new ArrayList<>();
        s.forEach(e -> {
            res.add(adapt(e));
        });
        return res;
    }

}
